﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Text.RegularExpressions;
using System.Text;
using System.Security.Cryptography;
using System.IO;

namespace UtilsBase
{
    /// <summary>
    /// 字符串处理
    /// </summary>
    public class UtilsNumber
    {
        /// <summary>
        /// 按位数获取四舍五入
        /// </summary>
        /// <param name="n"></param>
        /// <param name="len">位数</param>
        /// <returns></returns>
        public static double GetNumberForLength(double n, int len)
        {
            return Math.Round(n, len);//按照四舍五入的国际标准
        }

    }


}


